export const lineOption = {
  title: {
    show: true,
    text: '月新增文章数',
    left: 'center'
  },
  xAxis: {
    axisLabel: {
      interval: 2
    },
    axisTick: {
      alignWithLabel: true
    },
    data: ['A', 'B', 'C', 'D', 'E']
  },
  yAxis: {
    show: true,
    name: '数量',
    type: 'value'
  },
  tooltip: {

  },
  toolbox: {
    feature: {
      saveAsImage: {
        show: true,
        type: 'png'
      },
      dataZoom: {
        show: true
      },
      restore: {
        show: true
      }
    }
  },
  series: [
    {
      data: [10, 22, 28, 23, 100],
      type: 'line',
      smooth: true,
      areaStyle: {
        color: {
          type: 'linear',
          x: 0,
          y: 0,
          x2: 0,
          y2: 1,
          colorStops: [
            {
              offset: 0, color: '#304156'
            },
            {
              offset: 1, color: '#fff'
            }
          ],
          global: false
        },
        opacity: 0.5
      },
      itemStyle: {
        normal: {
          color: '#2b2f3a', // 改变折线点的颜色
          lineStyle: {
            color: '#2b2f3a' // 改变折线颜色
          }
        }
      }
    }
  ]
}
export const pieOption = {
  title: {
    show: true,
    text: '分类文章数量',
    left: 'center'
  },
  tooltip: {
    trigger: 'item',
    formatter: '{b}: {c}篇 <br/>占比{d}%'
  },
  toolbox: {
    feature: {
      saveAsImage: {
        show: true,
        type: 'png'
      }
    }
  },
  series: [
    {
      type: 'pie',
      data: [],
      radius: ['40%', '70%'],
      label: {
        position: 'outer',
        alignTo: 'edge',
        margin: 10,
        edgeDistance: '1%'
      }
    }
  ]
}
